#ifndef EMPLOYCLIENT_H
#define EMPLOYCLIENT_H

#include <QWidget>
#include <QTcpSocket>
#include <QHostAddress>
#include <QDebug>
#include <QMessageBox>
#include <QList>

#include "logindialog.h"

QT_BEGIN_NAMESPACE
namespace Ui { class employclient; }
QT_END_NAMESPACE

//实例化一个客户端的对象
void sendMessage(const QByteArray &msg);


class employclient : public QWidget
{
    Q_OBJECT

public:
    employclient(QWidget *parent = nullptr);
    ~employclient();

private slots:
    void on_connectServerBtn_clicked();
    void on_connected_slots();
    void on_disconnected_slots();
    void on_readyRead_slots();

    void on_updateMsgBtn_clicked();

    void on_sendSaveMsgBtn_clicked();

    void on_readMsgBtn_clicked();

private:
    Ui::employclient *ui;
    loginDialog *login;

    //服务器ip的地址
    QHostAddress hostAddress;

    //客户端用户名
    QString workNum;
    QString name;
    QString sex;
    QString birth;
    QString post;
    QString salary;

    //服务器的端口号
    quint16 port;

    //连接服务器的按钮状态
    bool connectServerBtn_statues;


};
#endif // EMPLOYCLIENT_H
